﻿@charset "utf-8";

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
dl,
dt,
dd,
ul,
ol,
li,
form,
button,
input,
textarea,
th,
td {
    margin: 0;
    padding: 0;
}
body {
    font-family: Microsoft Yahei, Arial, Simsun, Helvetica, Segoe UI, sans-serif;
}
ul,
ol {
    list-style: none;
}
div,
img,
a {
    border: none;
}
a {
    text-decoration: none;
    color: inherit;
}

* {
    outline: none;
    font-style: normal;
    font-family: inherit;
    vertical-align: baseline;
    -webkit-tap-highlight-color: rgba(255, 0, 0, 0);
}

@import './anima.less';
@import './font/index.less';
@import './global.less';

img {
    border: 0;
    display: block;
}

ul,
ol,
li,
dt,
dl,
dd,
em,
p {
    margin: 0;
    padding: 0;
    list-style: none;
    text-decoration: none;
    vertical-align: middle;
}

html {
    line-height: inherit !important;
}
body {
    font-size: 12px !important;
    margin: auto !important;
    background-color: transparent !important;
    a {
        // 禁止webview上的a链接长按显示预览弹窗
        -webkit-touch-callout: none;
        -webkit-user-drag: none;
        user-select: none;
    }
}

#J_Page {
    margin: auto;
    background: none;
    &.page-placeholder {
        width: auto;
    }
}

#Page {
    width: 7.5rem;
    margin: 0 auto;
    position: relative;
    min-height: 100vh;

    &.pageMode-pc {
        width: auto;
    }
}

.promptTip {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 7.5rem;
    z-index: 1999;
    display: none;
    .loading {
        position: absolute;
        left: 50%;
        top: 50%;
        width: 3.6rem;
        transform: translate(-50%, -50%);
        background-color: rgba(0, 0, 0, 0.7);
        border-radius: 2px;
        font-size: 14px;
        color: #fff;
        padding: 0.3rem 0.2rem;
        line-height: 20px;
        overflow: hidden;
        white-space: normal;
        z-index: 9999;
        text-align: center;
    }
}

.wptMask {
    position: fixed;
    height: 100%;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #000;
    z-index: 1999;
    opacity: 0.1;
}

.clearfix:after {
    content: ' ';
    display: block;
    clear: both;
    height: 0;
}
.clearfix {
    zoom: 1;
}
.hide {
    display: none;
}
.fl {
    float: left;
}
.fr {
    float: right;
}
.backgroundImg {
    background-color: white;
}

.font-img {
    position: relative;
    background-color: white;
    color: #bcbcbc;
}
.font-img i {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%, -50%);
    left: 50%;
}
.flexTop {
    position: fixed;
    top: 0;
}
.touchEffect {
    background-color: rgba(0, 0, 0, 0.1) !important;
}
.ui-tips {
    position: fixed;
    margin: auto;
    left: 0;
    right: 0;
    top: 3rem;
    width: 2.5rem;
    text-align: center;
    color: red;
}

.wpt-leave {
    opacity: 1;
    transition: opacity 0.5s ease-in;
}
.wpt-leave.wpt-leave-active {
    opacity: 0.01;
}
.wpt-enter {
    opacity: 0.01;
    transition: opacity 0.5s ease-in;
}
.wpt-enter.wpt-enter-active {
    opacity: 1;
}

@-webkit-keyframes fadeIn {
    0% {
        opacity: 0; /*初始状态 透明度为0*/
    }
    40% {
        opacity: 0; /*中间状态 透明度为0*/
    }
    100% {
        opacity: 1; /*结尾状态 透明度为1*/
    }
}
@keyframes fadeIn {
    0% {
        opacity: 0; /*初始状态 透明度为0*/
    }
    40% {
        opacity: 0; /*中间状态 透明度为0*/
    }
    100% {
        opacity: 1; /*结尾状态 透明度为1*/
    }
}
.fadeIn {
    -webkit-animation-name: fadeIn; /*动画名称*/
    -webkit-animation-duration: 1s; /*动画持续时间*/
    -webkit-animation-iteration-count: 1; /*动画次数*/
    -webkit-animation-delay: 0s; /*延迟时间*/

    animation-name: fadeIn; /*动画名称*/
    animation-duration: 1s; /*动画持续时间*/
    animation-iteration-count: 1; /*动画次数*/
    animation-delay: 0s; /*延迟时间*/
}

.imgFadeIn {
    -webkit-animation-name: imgFadeIn; /*动画名称*/
    -webkit-animation-duration: 1s; /*动画持续时间*/
    -webkit-animation-iteration-count: 1; /*动画次数*/
    -webkit-animation-delay: 0s; /*延迟时间*/
    -webkit-animation-timing-function: ease-out;

    animation-name: imgFadeIn; /*动画名称*/
    animation-duration: 1s; /*动画持续时间*/
    animation-iteration-count: 1; /*动画次数*/
    animation-delay: 0s; /*延迟时间*/
    animation-timing-function: ease-out;
}

@-webkit-keyframes imgFadeIn {
    0% {
        opacity: 0; /*初始状态 透明度为0*/
    }
    100% {
        opacity: 1; /*结尾状态 透明度为1*/
    }
}
@keyframes imgFadeIn {
    0% {
        opacity: 0; /*初始状态 透明度为0*/
    }
    100% {
        opacity: 1; /*结尾状态 透明度为1*/
    }
}

.fadeInShort {
    -webkit-animation-name: fadeIn; /*动画名称*/
    -webkit-animation-duration: 0.6s; /*动画持续时间*/
    -webkit-animation-iteration-count: 1; /*动画次数*/
    -webkit-animation-delay: 0s; /*延迟时间*/

    animation-name: fadeIn; /*动画名称*/
    animation-duration: 0.6s; /*动画持续时间*/
    animation-iteration-count: 1; /*动画次数*/
    animation-delay: 0s; /*延迟时间*/
}

@-webkit-keyframes fadeOut {
    0% {
        opacity: 1; /*初始状态 透明度为0*/
    }
    50% {
        opacity: 0.5; /*中间状态 透明度为0*/
    }
    100% {
        opacity: 0; /*结尾状态 透明度为1*/
    }
}
.fadeOut {
    -webkit-animation-name: fadeOut; /*动画名称*/
    -webkit-animation-duration: 0.5s; /*动画持续时间*/
    -webkit-animation-iteration-count: 1; /*动画次数*/
    -webkit-animation-delay: 0s; /*延迟时间*/
}

.supportBanner {
    width: 100%;
    color: #888;
    height: 49px;
    font-size: 12px;
    line-height: 49px;
    text-align: center;

    &.iphoneX {
        padding-bottom: 34px;
        background-color: rgb(248, 248, 248);
    }
}

.supportBanner .company {
    color: #f2b896;
}

/*0.5像素边框*/
.wpt-border {
    position: relative;
}

.wpt-border:after {
    position: absolute;
    content: '';
    background-color: #d9d9d9;
}

.wpt-border.horizonTop:after,
.wpt-border.horizonBottom:after {
    width: 100%;
    height: 1px;
    transform: scaleY(0.5);
    -webkit-transform: scaleY(0.5);
}

.wpt-border.horizonTop:after {
    left: 0;
    top: 0;
}

.wpt-border.horizonBottom:after {
    left: 0;
    bottom: 0;
}

.wpt-border.verticalLeft:after,
.wpt-border.verticalRight:after {
    width: 1px;
    height: 100%;
    transform: scaleX(0.5);
    -webkit-transform: scaleX(0.5);
}

.wpt-border.verticalLeft:after {
    top: 0;
    left: 0;
}

.wpt-border.verticalRight:after {
    top: 0;
    right: 0;
}

//买家、卖家等级icon
.sellerLevel {
    float: left;
    width: 28px;
    height: 15px;
    background-size: 28px auto;
    background-repeat: no-repeat;
    border-radius: 1px;
    background-image: url(/webApp/images/global/sellerLevels.png);
    &.lv1 {
        background-position: 0 0;
    }
    &.lv2 {
        background-position: 0 -15px;
    }
    &.lv3 {
        background-position: 0 -30px;
    }
    &.lv4 {
        background-position: 0 -45px;
    }
    &.lv5 {
        background-position: 0 -60px;
    }
    &.lv6 {
        background-position: 0 -75px;
    }
    &.lv7 {
        background-position: 0 -90px;
    }
    &.lv8 {
        background-position: 0 -105px;
    }
    &.lv9 {
        background-position: 0 -120px;
    }
    &.lv10 {
        background-position: 0 -135px;
    }
    &.lv11 {
        background-position: 0 -150px;
    }
    &.lv12 {
        background-position: 0 -165px;
    }
    &.lv13 {
        background-position: 0 -180px;
    }
    &.lv14 {
        background-position: 0 -195px;
    }
    &.lv15 {
        background-position: 0 -210px;
    }
}

// 新卖家等级icon
.newSellerLevel {
    background-image: url(https://cdn.weipaitang.com/static/201902271bb31a17-2e66-4721-9722-4a0b6c25e611-W76H450);
    width: 38px;
    height: 15px;
    background-size: 100% auto;
    .generate-lv(15);

    .generate-lv(@n, @i: 1) when (@i =< @n) {
        &.lv@{i} {
            // 买家等级从v1开始算，但此时百分比是0%
            // 等级分15份，但分母应该是15 - 1，这样当i时15的时候，计算出的值才是100%
            background-position: 0 percentage((@i - 1)/ (@n - 1));
        }
        .generate-lv(@n, (@i + 1));
    }
}

/*0.5像素边框*/
.border {
    position: relative;
}
.border:after {
    position: absolute;
    content: '';
    background-color: #eee;
}
.border.horizonTop:after,
.border.horizonBottom:after {
    width: 100%;
    height: 1px;
    transform: scaleY(0.5);
    -webkit-transform: scaleY(0.5);
}
.border.horizonTop:after {
    left: 0;
    top: 0;
}
.border.horizonBottom:after {
    left: 0;
    bottom: 0;
}
.border.verticalLeft:after,
.border.verticalRight:after {
    width: 1px;
    height: 100%;
    transform: scaleX(0.5);
    -webkit-transform: scaleX(0.5);
}
.border.verticalLeft:after {
    top: 0;
    left: 0;
}
.border.verticalRight:after {
    top: 0;
    right: 0;
}

.sellerLevel {
    float: left;
    width: 28px;
    height: 15px;
    background-size: 28px auto;
    background-repeat: no-repeat;
    border-radius: 1px;
    background-image: url(//cdn.weipaitang.com/res/img/sellerLevels.png?t=2);
}

.sellerLevel.lv1,
.lv1 {
    background-position: 0 0;
}

.sellerLevel.lv2,
.lv2 {
    background-position: 0 -15px;
}

.sellerLevel.lv3,
.lv3 {
    background-position: 0 -30px;
}

.sellerLevel.lv4,
.lv4 {
    background-position: 0 -45px;
}

.sellerLevel.lv5,
.lv5 {
    background-position: 0 -60px;
}

.sellerLevel.lv6,
.lv6 {
    background-position: 0 -75px;
}

.sellerLevel.lv7,
.lv7 {
    background-position: 0 -90px;
}

.sellerLevel.lv8,
.lv8 {
    background-position: 0 -105px;
}

.sellerLevel.lv9,
.lv9 {
    background-position: 0 -120px;
}

.sellerLevel.lv10,
.lv10 {
    background-position: 0 -135px;
}

.sellerLevel.lv11,
.lv11 {
    background-position: 0 -150px;
}

.sellerLevel.lv12,
.lv12 {
    background-position: 0 -165px;
}

.sellerLevel.lv13,
.lv13 {
    background-position: 0 -180px;
}

.sellerLevel.lv14,
.lv14 {
    background-position: 0 -195px;
}

.sellerLevel.lv15,
.lv15 {
    background-position: 0 -210px;
}

input.switch {
    position: relative;
    width: 52px;
    height: 32px;
    outline: none;
    display: block;
    margin: 0;
    border-radius: 16px;
    box-sizing: border-box;
    -webkit-appearance: none;
    border: solid 1px #dfdfdf;
    background-color: #dfdfdf;
    cursor: pointer;
}

input.switch:checked {
    background-color: #53d769;
    border: solid 1px #53d769;
}

input.switch:before {
    position: absolute;
    content: '';
    top: 0;
    left: 0;
    width: 50px;
    height: 30px;
    border-radius: 15px;
    background-color: #fff;
    transition: transform 0.3s;
}

input.switch:checked:before {
    transform: scale(0);
}

input.switch:after {
    position: absolute;
    content: '';
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    border-radius: 15px;
    background-color: #fff;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

input.switch:checked:after {
    transform: translateX(20px);
}

//层级
.z-nav {
    z-index: 10;
}

.z-mask {
    z-index: 20;
}

.z-pop {
    z-index: 30;
}

.priceSymbol {
    font-size: 0.75em;
}

.priceUp {
    font-size: 0.8em;
}

.baselineDown {
    vertical-align: -1px;
}

.baselineUp {
    vertical-align: 1px;
}

.png() {
    background-repeat: no-repeat;
    background-size: 100%;
    background-position: center;
}

.png-enablereturn {
    .png();
    background-image: url(https://cdn.weipaitang.com/static/201809132059c901-ab0f-4780-b3ef-7d917f7f0b1f-W90H45);
}
.png-freepost {
    .png();
    background-image: url(https://cdn.weipaitang.com/static/2018091370927305-eea0-4c5c-843a-a715d447c15a-W90H45);
}
.png-deliveryFast {
    .png();
    background-image: url(https://cdn.weipaitang.com/static/201810231df611a6-9c62-4c91-b51d-750153c7463a-W150H45);
}
.png-jbp {
    .png();
    background-image: url(https://cdn.weipaitang.com/static/2018091309674c30-9b40-4a80-b1ad-d00d5e0ac39c-W120H45);
}
.png-checkup {
    .png();
    background-image: url(https://cdn.weipaitang.com/static/20180913fc6f5b36-c9c1-49ad-b88d-cd941fcd8c52-W120H45);
}
.png-fontfullbzj {
    .png();
    background-image: url(https://cdn.weipaitang.com/static/201809138a0962d9-f778-4477-b4dd-7dd9cb15c9f8-W120H45);
}
.png-identified {
    .png();
    background-image: url(https://cdn.weipaitang.com/static/201901294f7028c3-bf8d-4453-a13a-70cc1b36b868-W120H45);
}

/* ipx 样式兼容 */
.needBottomFit {
    .wptd-modal-multiConfirm,
    .wptd-modal-confirm,
    .wptd-modal-alert {
        > button {
            box-sizing: content-box;
            padding-bottom: 34px;
        }
    }
}

.device-bdXcx .baidu-hidden {
    display: none !important;
}
